Topic 1 Question #5
You are running an application in a virtual machine (VM) using a custom Debian image. The image has the Stackdriver Logging agent installed. The VM has the cloud-platform scope. The application is logging information via syslog. You want to use Stackdriver Logging in the Google Cloud Platform Console to visualize the logs. You notice that syslog is not showing up in the "All logs" dropdown list of the Logs Viewer.
What is the first thing you should do?
- A.
Look for the agent's test log entry in the Logs Viewer.
- B.
Install the most recent version of the Stackdriver agent.
- C.
Verify the VM service account access scope includes the monitoring.write scope.
- D.
SSH to the VM and execute the following commands on your VM: ps ax | grep fluentd.
Answer: D
This question assesses core Cloud Logging (formerly Stackdriver Logging) agent troubleshooting knowledge required for the Professional Cloud DevOps Engineer certification, which emphasizes systematic, low-impact first steps for operational issue resolution. The scenario confirms the VM has the cloud-platform access scope, which includes all necessary permissions for log ingestion, and that the Logging agent is already installed. The most common root cause for missing syslog logs from a pre-installed agent is that the agent process is not running, due to startup failures, post-installation crashes, or service misconfiguration. Verifying the agent process status is the logical first diagnostic step, as it immediately rules out a critical foundational failure before moving to more complex or intrusive checks. Option Analysis:
A. Incorrect. Searching for the agent's test log entry is a valid later troubleshooting step, but it is not the first action to take. If the agent process is not running at all, no test entries will exist in the Logs Viewer, so this check would provide no actionable root cause information and waste diagnostic time.
B. Incorrect. Upgrading to the latest agent version is a premature, intrusive action. The question explicitly states the agent is already installed, and there is no indication that an outdated agent version is the source of the issue. Troubleshooting should first confirm the existing installed agent is functional before modifying the deployment.
C. Incorrect. This option is invalid for two key reasons: first, the scenario explicitly confirms the VM has the cloud-platform scope, which includes the logging.write permission required for log ingestion (the monitoring.write scope referenced is for Cloud Monitoring metrics ingestion, not logging, making it irrelevant to this issue). Second, scope misconfiguration would block all log ingestion, not just syslog logs, so this check is unnecessary given the provided scenario details.
D. Correct. The Stackdriver Logging agent is built on the Fluentd open source log collector, so its active runtime process is named fluentd. Running the ps ax | grep fluentd command confirms if the agent process is active, which is the most fundamental first check for missing agent-shipped logs. If the process is not running, you can immediately proceed to troubleshoot agent startup failures, rather than wasting time on higher-level checks. Key Concepts:
1. Systematic Troubleshooting Workflow: The Professional Cloud DevOps Engineer certification prioritizes foundational, low-effort checks first (such as process status) before moving to configuration changes or software modifications, to minimize operational disruption and speed up root cause identification.
2. Google Cloud VM Access Scopes: The cloud-platform scope is a broad, predefined access scope that grants all permissions for interacting with Google Cloud services, including the logging.write permission required to send logs to Cloud Logging, eliminating scope misconfiguration as a root cause in this scenario.
3. Cloud Logging Agent Architecture: The legacy Stackdriver Logging agent uses Fluentd as its underlying log collection engine, so process checks targeting the fluentd binary are the standard method to confirm the agent is actively running. References:
Troubleshooting the Cloud Logging agent, Cloud Logging Agent Overview